<?php echo $this->Html->css(array(HOST.'/dictionary',HOST.'/form',HOST.'/actions'),null,array('inline'=>false));?>
<?php echo $this->Html->script(array(HOST.'/actions'),$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));?>

<body>
<?php echo $this->Section->main(); ?>

	<div class="container container_3">		
		<div class='grid_1'>
			<?php echo $this->Html->link($this->Html->image(HOST.'/logo.png'),'/',array('escape'=>false))?>
			<?php echo $this->element('menu-left')?>
		</div>		
		<div class='grid_2'>
			<div class="container container_offers_3">
				<div class="offers_grid_3">
					<div class="content">



						<div class="typs index">
							<h2><?php __('Typy');?></h2>
							<table cellpadding="0" cellspacing="0">
							<tr>
									<th><?php echo $this->Paginator->sort('id');?></th>
									<th><?php echo $this->Paginator->sort('name');?></th>
									<th class="actions"><?php __('Actions');?></th>
							</tr>
							<?php
							$i = 0;
							foreach ($typs as $typ):
								$class = null;
								if ($i++ % 2 == 0) {
									$class = ' class="altrow"';
								}
							?>
							<tr<?php echo $class;?>>
								<td><?php echo $typ['Typ']['id']; ?>&nbsp;</td>
								<td><?php echo $typ['Typ']['name']; ?>&nbsp;</td>
								<td class="actions">
									<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $typ['Typ']['id'])); ?>
									<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $typ['Typ']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $typ['Typ']['id'])); ?>
								</td>
							</tr>
						<?php endforeach; ?>
							</table>
							<p>
							<?php
							echo $this->Paginator->counter(array(
							'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
							));
							?>	</p>
						
							<div class="paging">
								<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
							 | 	<?php echo $this->Paginator->numbers();?>
						 |
								<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
							</div>
						</div>
						
						<?php if($session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'admin' || $session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'manag'){?>		
						<div class="actions main_actions">
							<h3><?php __('Actions'); ?></h3>
							<ul>
								<li><?php echo $this->Html->link(__('Dodaj typ', true), array('action' => 'add')); ?></li>
								<li><?php echo $this->Html->link(__('Lista ofert', true), array('controller' => 'offers', 'action' => 'index')); ?> </li>
								
							</ul>
						</div>
						<?php }?>
				
					
					
					
					</div>
				</div>
			</div>			
		</div>
		<div class='clear'>&nbsp;</div>
		<?php echo $this->element('footer')?>
	</div>
	<div class='clear'>&nbsp;</div>
</body>			